Expand description

datachannel-facade is a library that abstracts over platform-specific WebRTC DataChannel implementations.

It works both in the browser and natively (via libdatachannel).

The following docs are from MDN.

Modules§

  • Platform-specific functionality.

Structs§

  • An object providing options to configure the new connection:
  • The RTCDataChannel interface represents a network channel which can be used for bidirectional peer-to-peer transfers of arbitrary data. Every data channel is associated with an RTCPeerConnection, and each peer connection can have up to a theoretical maximum of 65,534 data channels (the actual limit may vary from browser to browser).
  • An object providing configuration options for the data channel. It can contain the following fields:
  • The RTCSessionDescription interface describes one end of a connection—or potential connection—and how it’s configured. Each RTCSessionDescription consists of a description type indicating which part of the offer/answer negotiation process it describes and of the SDP descriptor of the session.
  • An underlying platform error.
  • A server which may be used by the ICE agent; these are typically STUN and/or TURN servers.
  • The RTCPeerConnection interface represents a WebRTC connection between the local computer and a remote peer. It provides methods to connect to a remote peer, maintain and monitor the connection, and close the connection once it’s no longer needed.

Enums§

  • The read-only property RTCPeerConnection.iceGatheringState returns a string that describes the connection’s ICE gathering state. This lets you detect, for example, when collection of ICE candidates has finished.
  • A string representing the current ICE transport policy. Possible values are:
  • The read-only connectionState property of the RTCPeerConnection interface indicates the current state of the peer connection by returning one of the following string values: new, connecting, connected, disconnected, failed, or closed.
  • The property RTCSessionDescription.type is a read-only string value which describes the description’s type.